﻿using Qin.ScheduleTask.Common;
using System;

namespace ScheduleTask.Tasks
{
    public class PasswordMonitorTask : BaseTask
    {
        public PasswordMonitorTask(IServiceProvider servicePovider)
            : base(servicePovider, TaskType.PerDay, "PasswordMonitorTask", TimeSpan.FromHours(15).Add(TimeSpan.FromMinutes(27)))
        {

        }

        protected override void ExecuteTask(IServiceProvider serviceProvider)
        {
            Console.WriteLine($"{DateTime.Now.ToString()}Run PasswordMonitorTask Task");
        }
    }

    public class PasswordMonitorTask2 : BaseTask
    {
        public PasswordMonitorTask2(IServiceProvider servicePovider)
            : base(servicePovider, TaskType.PerRegularMinute, "PasswordMonitorTask2", 5)
        {

        }

        protected override void ExecuteTask(IServiceProvider serviceProvider)
        {
            Console.WriteLine($"{DateTime.Now.ToString()}Run PasswordMonitorTask2 Task");
        }
    }
}
